﻿/****** Object:  Table [dbo].[AuditLog]    Script Date: 2017/3/9 13:26:16 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[AuditLog](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[EditorName] [nvarchar](100) NULL,
	[EditTime] [datetime] NULL,
	[EditorId] [int] NOT NULL,
	[MethodName] [nvarchar](200) NULL,
	[EnumAuditAction] [int] NOT NULL,
	[EntityName] [nvarchar](100) NULL,
	[EntityKeyName] [nvarchar](100) NULL,
	[EntityKeyValue] [nvarchar](500) NULL,
 CONSTRAINT [PK_AuditLog] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO


/****** Object:  Table [dbo].[AuditLogItem]    Script Date: 2017/3/9 13:26:48 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[AuditLogItem](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[AuditLogId] [int] NOT NULL,
	[PropertyName] [nvarchar](100) NULL,
	[OldValue] [nvarchar](500) NULL,
	[NewValue] [nvarchar](500) NULL,
 CONSTRAINT [PK_AuditLogItem] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO